import request from '@/utils/request'

// 获取案例列表
export function listCase(query) {
  return request({
    url: '/official/case/list',
    method: 'get',
    params: query
  })
}

// 获取案例详情
export function getCase(id) {
  return request({
    url: '/official/case/detail',
    method: 'get',
    params: { id: id }
  })
}

// 新增案例
export function addCase(data) {
  return request({
    url: '/official/case/save',
    method: 'post',
    data: data
  })
}

// 修改案例
export function updateCase(data) {
  return request({
    url: '/official/case/save',
    method: 'post',
    data: data
  })
}

// 删除案例
export function delCase(id) {
  return request({
    url: '/official/case/delete/' + id,
    method: 'delete'
  })
}
